# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import enterpriseMessageConstants
class EnterpriseMessageSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(EnterpriseMessageSubDirectiveTree, self).__init__(parent)
        self.createEnterpriseMessageTreeNode()

    def createEnterpriseMessageTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "enterpriseMessage"
        self.setText(0,"企业群通知")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, enterpriseMessageConstants.EnterpriseMessageConstants.enterpriseWeiXinMessageDirective, "企业微信群通知")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, enterpriseMessageConstants.EnterpriseMessageConstants.dingdingGroupMessageDirective, "钉钉群通知")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, enterpriseMessageConstants.EnterpriseMessageConstants.feishuGroupMessageDirective, "飞书群通知")
